Skip to content

Plan D: web Socket.IO bridge + LangGraph retirement - #8

Merged
adbarc92 merged 10 commits into
mainfrom
feat/engine-plan-d-web-bridge
Jul 25, 2026
Merged

Plan D: web Socket.IO bridge + LangGraph retirement#8
adbarc92 merged 10 commits into
mainfrom
feat/engine-plan-d-web-bridge

Conversation

@adbarc92

Copy link
Copy Markdown
Owner

Plan D — Web bridge + LangGraph retirement

Makes the parallel engine the sole orchestrator and gives it a live web UI. Stacked on #7 (Plan C) — merge #7 first, then this (GitHub retargets to main once #7 lands).

What this does

  • backend/main.py now drives the engine over Socket.IO. start_project boots a real engine run (state server + worker subprocesses, human-approval mode); a snapshot-diff poller translates engine state into the React frontend's existing events (agent_status, phase_complete, approval_required prd/plan, budget_update). approve/rejectsubmit_approval. So the existing React graph UI renders live engine runs — the old working web UI is preserved, now engine-backed.
  • run.start_run()/stop_run() — a reusable, self-cleaning run handle extracted from run_pipeline (atomic: tears down on mid-spawn failure).
  • backend/engine/webbridge.py — pure, unit-tested snapshot→frontend mappers (incl. the discrete budget-threshold bucket {0,50,75,85,95,100} the frontend meter expects, and a "downgraded" agent status when budget swaps a model).
  • LangGraph retired. backend/graph.py + backend/orchestrator.py + ~13 coupled/obsolete tests deleted; langgraph + langgraph-checkpoint-sqlite deps and the mypy override dropped. Zero legacy references remain.

Evidence

  • Every task went through TDD + independent spec/quality review (Tasks 1 & 2 each took a Critical fix; Task 3's run-leak findings were fixed — completed runs now stop_run + a FastAPI lifespan shutdown() reclaims everything). Final opus whole-branch review: ready-to-merge (one Important frontend-id mismatch, qaqa_test, fixed here and confirmed with tsc --noEmit).
  • CI-green: ruff 0, black clean, pytest tests/ = 154 passed, 86.93% coverage (gate 70%). Frontend type-checks.

Manual check + tracked follow-ups (not blocking)

  • Live browser render is the one manual check (run python -m backend.main + cd frontend && npm run dev) — the emitted event shapes are reproduced verbatim from frontend/src/types/index.ts and every phase-worker node id now matches the engine.
  • Bounded lifecycle gaps for a single-user tool (no start_project dedup / disconnect teardown / poller-retry — all reclaimed at server shutdown), the design-inherited in-memory-only load_project after restart, and the ADR-only (vs combined) plan-gate card are noted as follow-ups.

adbarc92 added a commit that referenced this pull request Jul 25, 2026
The v1.0.0 tag is held local until the #7 -> #8 -> #9 stack lands on
main, so a badge linking straight to releases/tag/v1.0.0 would 404.
Base automatically changed from feat/engine-plan-c-evidence to main July 25, 2026 17:20
@adbarc92
adbarc92 merged commit 667e21f into main Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant